#ifndef __TOOLS_H__
#define __TOOLS_H__

#include <assert.h>

typedef int BOOL;

#define TRUE	1
#define FALSE	0

#define MSG_ERR		1
#define MSG_DBG		2
#define MSG_INF		3

#define xx_inf(msg...) xx_msg( MSG_INF, ## msg )
#define xx_dbg(msg...) xx_msg( MSG_DBG, ## msg )
#define xx_err(msg...) xx_msg( MSG_ERR, ## msg )

#if 1
#define xx_assert(expression)	\
			assert(expression)
#endif

enum debug{
	DBG_ERROR,
	DBG_INFO
};

void xx_msg(int level, const char *msg, ...);
int  check_torrent_name(const char *mesg);
void get_rand_string(int min, int max, int len, char *str);

#endif

